import { v4 } from "uuid";
import { config } from 'dotenv'
import { getWeiBoLoginQrcode, weiboLoginAck, weiboLogin } from "./login/weibo";
import { listenSpiderWeiBo } from "./spider/weibo";
import { JdLoginer } from "./login/jd";
export async function bootstrap() {
    config()
    const clientId = process.env.APP_ID || v4()
    const reqId = v4()
    // weiboLogin(clientId, reqId)
    // const qrcode = await getWeiBoLoginQrcode(reqId)
    // console.log(qrcode)
    const jdLoginer = new JdLoginer(reqId, clientId)
    await jdLoginer.run()
    console.log(`https://jointmodeling.cn/login/qrcode?reqId=${reqId}`)
    // await listenSpiderWeiBo(clientId)
}

bootstrap()
